<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	    <link rel="stylesheet" type="text/css" href="js/bootstarp-3.3.7/css/bootstrap.min.css"/>
		<script src="vendor/jquery/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstarp-3.3.7/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="js/bootstarp-table-1.11.1/bootstrap-table.min.css" />
		<script src="js/bootstarp-table-1.11.1/bootstrap-table.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstarp-table-1.11.1/bootstrap-table-zh-CN.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap-table-export.js"></script>
        <script src="js/tableExport.min.js"></script>
        <script src="js/xlsx.core.min.js"></script> 
        <script src="js/FileSaver.min.js"></script>
        
        <script>
			$(function() { //, headers: { 'x-requested-with': 'XMLHttpRequest' }
				$.ajaxSetup({
					crossDomain: true,
					xhrFields: {
						withCredentials: true
					}
				});
			});
		</script>
		
		<script type="text/javascript">
				
			$(function(){
			
			price();
			
//				list();
			
			})
			function price(){
				$("#d2,#d3,#d4").hide();
				$("#d1").show(); 
				$("#tab1").bootstrapTable({
					url: "http://127.0.0.1:8099/getHis_money",
					pagination: true,
					pageSize: 10,
					queryParams:function() {
				return{
					"true_name" :$("#true_name").val(),
					"time1" :$("#time1").val(),
					"time2" :$("#time2").val()
				}
						
					},
	
					columns: [{
						field: 'true_name',
						title: '医生',
						align: 'center',
					}, {
						field: 'mzsl',
						title: '门诊数量',
						align: 'center',
					}, {
						field: 'jzss',
						title: '就诊实收',
						align: 'center',
					},  {
						field: 'ghss',
						title: '挂号实收',
						align: 'center',
					},  {
						field: 'jztf',
						title: '就诊退费',
						align: 'center',
					},   {
						field: 'ghtf',
						title: '挂号退费',
						align: 'center',
					}],
					
					//>>>>>>>>>>>>>>导出excel表格设置
      				showExport: true,   //是否显示导出按钮(此方法是自己写的目的是判断终端是电脑还是手机,电脑则返回true,手机返回falsee,手机不显示按钮)
			      exportDataType: "basic",              //basic', 'all', 'selected'.
			      exportTypes:['excel','xlsx'],	    //导出类型
			      //exportButton: $('#btn_export'),     //为按钮btn_export  绑定导出事件  自定义导出按钮(可以不用)
			      exportOptions:{  
			          //ignoreColumn: [0,0],            //忽略某一列的索引  
			          fileName: '数据导出',              //文件名称设置  
			          worksheetName: 'Sheet1',          //表格工作区名称  
			          tableName: '商品数据表',  
			          excelstyles: ['background-color', 'color', 'font-size', 'font-weight'],  
			          //onMsoNumberFormat: DoOnMsoNumberFormat  
			      }
			      //导出excel表格设置<<<<<<<<<<<<<<<<
					
					
					})
					
					 
					
					
				
			
			}
			function list(){
				$("#d1,#d3,#d4").hide();
				$("#d2").show();
				
				$("#tab2").bootstrapTable({
					url: "http://127.0.0.1:8099/getHis_type",
					pagination: true,
					pageSize: 10,
					queryParams:function (){
				return{
					"true_name" :$("#true_name").val(),
					"time1" :$("#time1").val(),
					"time2" :$("#time2").val()
				}
					
					},

					columns: [{
						field: 'true_name',
						title: '医生',
						align: 'center',
					}, {
						field: 'number',
						title: '处方数量',
						align: 'center',
					}, {
						field: 'med_chinese',
						title: '中药处方',
						align: 'center',
					},  {
						field: 'additional_cost',
						title: '附加费用',
						align: 'center',
					},  {
						field: 'unit_price',
						title: '检查项目',
						align: 'center',
					},  {
						field: 'back_cost',
						title: '退费金额',
						align: 'center',
					},  {
						field: 'real_cost',
						title: '实收金额',
						align: 'center'
					}],
										
					//>>>>>>>>>>>>>>导出excel表格设置
      				showExport: true,   //是否显示导出按钮(此方法是自己写的目的是判断终端是电脑还是手机,电脑则返回true,手机返回falsee,手机不显示按钮)
			      exportDataType: "basic",              //basic', 'all', 'selected'.
			      exportTypes:['excel','xlsx'],	    //导出类型
			      //exportButton: $('#btn_export'),     //为按钮btn_export  绑定导出事件  自定义导出按钮(可以不用)
			      exportOptions:{  
			          //ignoreColumn: [0,0],            //忽略某一列的索引  
			          fileName: '数据导出',              //文件名称设置  
			          worksheetName: 'Sheet1',          //表格工作区名称  
			          tableName: '商品数据表',  
			          excelstyles: ['background-color', 'color', 'font-size', 'font-weight'],  
			          //onMsoNumberFormat: DoOnMsoNumberFormat  
			      }
					})
					
					
					
					
				
			
			}
			function listprice(){
				
//				$("#tab1").bootstrapTable('refresh');
                $("#d1,#d2,#d4").hide();
                $("#d3").show();
				$("#tab3").bootstrapTable({
					url: "http://127.0.0.1:8099/getHis_num",
					pagination: true,
					pageSize: 10,
					queryParams: queryParams3,
					columns: [{
						field: 'true_name',
						title: '医生',
						align: 'center',
					}, {
						field: 'registeredfee_name',
						title: '挂号名称',
						align: 'center',
					}, {
						field: 'registeredfee_sub_fee',
						title: '子费用总数',
						align: 'center',
					},  {
						field: 'numberOfSub',
						title: '子费用数量',
						align: 'center',
					},  {
						field: 'registeredfee_aggregate_amount',
						title: '挂号总金额',
						align: 'center',
					}],
					
					//>>>>>>>>>>>>>>导出excel表格设置
      				showExport: true,   //是否显示导出按钮(此方法是自己写的目的是判断终端是电脑还是手机,电脑则返回true,手机返回falsee,手机不显示按钮)
			      exportDataType: "basic",              //basic', 'all', 'selected'.
			      exportTypes:['excel','xlsx'],	    //导出类型
			      //exportButton: $('#btn_export'),     //为按钮btn_export  绑定导出事件  自定义导出按钮(可以不用)
			      exportOptions:{  
			          //ignoreColumn: [0,0],            //忽略某一列的索引  
			          fileName: '数据导出',              //文件名称设置  
			          worksheetName: 'Sheet1',          //表格工作区名称  
			          tableName: '商品数据表',  
			          excelstyles: ['background-color', 'color', 'font-size', 'font-weight'],  
			          //onMsoNumberFormat: DoOnMsoNumberFormat  
			      }
					})
					
					
					
					
				
			
			}
			function moneyPerson(){
				
//				$("#tab1").bootstrapTable('refresh');
                $("#d1,#d2,#d3").hide();
                $("#d4").show();
				$("#tab4").bootstrapTable({
					url: "http://127.0.0.1:8099/getHis_person",
					pagination: true,
					pageSize: 10,
					queryParams: queryParams4,
					columns: [{
						field: 'true_name',
						title: '收费员',
						align: 'center',
					}, {
						field: 'pay_num',
						title: '收费次数',
						align: 'center',
					}, {
						field: 'true_pay',
						title: '实收金额',
						align: 'center',
					},  {
						field: 'cash',
						title: '现金收入',
						align: 'center',
					},  {
						field: 'weChat',
						title: '微信支付',
						align: 'center',
					},  {
						field: 'alipay',
						title: '支付宝支付',
						align: 'center'
					},{
						
						
						
						
						
					}],
					
					//>>>>>>>>>>>>>>导出excel表格设置
      				showExport: true,   //是否显示导出按钮(此方法是自己写的目的是判断终端是电脑还是手机,电脑则返回true,手机返回falsee,手机不显示按钮)
			      exportDataType: "basic",              //basic', 'all', 'selected'.
			      exportTypes:['excel','xlsx'],	    //导出类型
			      //exportButton: $('#btn_export'),     //为按钮btn_export  绑定导出事件  自定义导出按钮(可以不用)
			      exportOptions:{  
			          //ignoreColumn: [0,0],            //忽略某一列的索引  
			          fileName: '数据导出',              //文件名称设置  
			          worksheetName: 'Sheet1',          //表格工作区名称  
			          tableName: '商品数据表',  
			          excelstyles: ['background-color', 'color', 'font-size', 'font-weight'],  
			          //onMsoNumberFormat: DoOnMsoNumberFormat  
			      }
					})
					
					
					
					
				
			
			}
			
			
			function sel(){
			    $("#tab1").bootstrapTable('refresh');
				$("#tab2").bootstrapTable('refresh');
				$("#tab3").bootstrapTable('refresh');
				$("#tab4").bootstrapTable('refresh');
				
			}
			function querParams1(){
				return{
					"true_name" :$("#true_name").val(),
					"time1" :$("#time1").val(),
					"time2" :$("#time2").val()
				}
				
			}
			function querParams2(){
				return{
					"true_name" :$("#true_name").val(),
					"time1" :$("#time1").val(),
					"time2" :$("#time2").val()
				}
				
			}
			function queryParams3(){
				return{
					"true_name" :$("#true_name").val(),
					"time1" :$("#time1").val(),
					"time2" :$("#time2").val()
				}
				
			}
			function queryParams4(){
				return{
					"true_name" :$("#true_name").val(),
					"time1" :$("#time1").val(),
					"time2" :$("#time2").val()
				}
			}
			
			
			
			
			


			
			
			
			
			
			
			
		</script>
	</head>
	<body>
	<div id="">
		<button id="btn1" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"  onclick="price()">门诊费用统计</button>
		<button id="btn2" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"  onclick="list()">门诊处方统计</button>
		<button id="btn3" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"  onclick="listprice()">门诊挂号费统计</button>
		<button id="btn4" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"  onclick="moneyPerson()">收费员统计</button>
		
		
		
		
		

		<div id="">
	日期：  <input type="date" name="time1" id="time1" value="" />    -   <input type="date" name="time2" id="time2" value="" /><tr>
	医生姓名：<input type="text" name="true_name" id="true_name" value="" /> 
	<button id="btn5" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"  onclick="sel()">查询</button>

<div id="d1">
	       <table id="tab1">
		
		
		
		
	</table>
</div>

<div id="d2">
	       <table id="tab2">
		
		
		
		
	</table>
</div>
<div id="d3">
	       <table id="tab3">
		
		
		
		
	</table>
</div>
<div id="d4">
	       <table id="tab4">
		
		
		
		
	</table>
</div>
			
		</div>
	
			          
	</div>
	
	
	</body>
</html>
i